#include "widget.h"
#include "ui_widget.h"
#include "QDebug"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    waitWidget = new WaitWidget(this);
    waitWidget->show();
}

Widget::~Widget()
{
    delete ui;
}


void Widget::moveEvent(QMoveEvent *event)
{
   // qDebug()<<this->mapToGlobal(QPoint(0,0)) << x() << y();
   // waitWidget->move(this->mapToGlobal(QPoint(0,0)));
    waitWidget->movebyParent();
}

void Widget::resizeEvent(QResizeEvent *event)
{
   // waitWidget->resize(width(),height());
    waitWidget->resizebyParent();
}

